Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split prior infections and growth calculation into separate function #888

Merged
merged 6 commits into from
Dec 12, 2024

Conversation

jamesmbaazam
Copy link
Contributor

@jamesmbaazam jamesmbaazam commented Dec 11, 2024

Description

This PR closes #887.

Initial submission checklist

  • My PR is based on a package issue and I have explicitly linked it.
  • I have tested my changes locally (using devtools::test() and devtools::check()).
  • I have added or updated unit tests where necessary.
  • I have updated the documentation if required and rebuilt docs if yes (using devtools::document()).
  • I have followed the established coding standards (and checked using lintr::lint_package()).
  • I have added a news item linked to this PR.

After the initial Pull Request

  • I have reviewed Checks for this PR and addressed any issues as far as I am able.

Copy link
Contributor

@sbfnk sbfnk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

Shall we call this something more specific than calculate_prior_estimates() (as could be confused with the other prior distributions)? Perhaps estimate_early_dynamics() or something like that?

Also, this is only used by create_stan_data() -- should it live in the same file for easier findability (not sure and open to other opinions).

R/create.R Outdated Show resolved Hide resolved
@jamesmbaazam
Copy link
Contributor Author

jamesmbaazam commented Dec 12, 2024

Cool!

Shall we call this something more specific than calculate_prior_estimates() (as could be confused with the other prior distributions)? Perhaps estimate_early_dynamics() or something like that?

I like estimate_early_dynamics(). Renamed in 90cc4a3.

Also, this is only used by create_stan_data() -- should it live in the same file for easier findability (not sure and open to other opinions).

I didn't want to ruin the aesthetics of all the functions in that script being called "create_*()" but it makes sense to live there and probably right above the function that calls it.

I've made the change in 340e570.

@jamesmbaazam jamesmbaazam requested a review from sbfnk December 12, 2024 15:30
@sbfnk sbfnk added this pull request to the merge queue Dec 12, 2024
Merged via the queue into main with commit 13dec33 Dec 12, 2024
9 checks passed
@sbfnk sbfnk deleted the split_create_stan_data branch December 12, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split up create_stan_data()?
2 participants